#include <M5StickC.h>

void EventHandler(Button* btn, int event) {
  if (event == Button::EVENT_ButtonPress
      || event == Button::EVENT_ButtonLongPressRepeat)
  {
    if (btn == &M5.BtHOME)
    {
      M5.Lcd.label1();
    }
    if (btn == &M5.BtSELE)
    {
      M5.Lcd.label2();
    }
  }
}

// the setup routine runs once when M5StickC starts up
void setup() {
  M5.begin();
  M5.Lcd.label();
  M5.EventAttach(EventHandler);
}

// the loop routine runs over and over again forever
void loop() {
  M5.Lcd.update();
  M5.update();
}